<div id='backup_modal' title='Haciendo copia de seguridad'>
    La operación puede tardar hasta 20 segundos ...
</div>
<script>
    $.get("<?php echo $this->webroot; ?>home/backupContents/"+Math.random(), {}, function(data){
        $( "#backup_modal" ).dialog({
                height: 100,
                width: 380,
                modal: true
        });
        $.post("<?php echo $this->webroot; ?>home/sendMail/"+Math.random(), {backup: data}, function(){
            $( "#backup_modal" ).dialog( "destroy" );
        });
    });
</script>